home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 2: CDPD 1 / Almathera Ten on Ten - Disc 2: CDPD 1.iso / pd / 051-075 / 074 / control / gadgets.c < prev    next >
C/C++ Source or Header  |  1995-03-13  |  23KB  |  598 lines

  1. /*********************************************************************/
  2. /*                                                                   */
  3. /*                     Copyright (c) 1987                            */
  4. /*                    Commodore-Amiga, Inc.                          */
  5. /*                    All rights reserved.                           */
  6. /*                                                                   */
  7. /*                                                                   */
  8. /*      Unlimited non-comercial use of this program is given,        */
  9. /*      provided this notice is left intact.                         */
  10. /*                      andy finkel                                  */
  11. /*                                                                   */
  12. /*********************************************************************/
  13.  
  14. #include "exec/types.h"
  15. #include "intuition/intuition.h"
  16.  
  17. #define OK 1
  18. #define CANCEL 2
  19. #define NUMBER1 3
  20. #define NUMBER2 4
  21. #define NUMBER3 5
  22. #define NUMBER4 6
  23. #define NUMBER5 7
  24. #define NUMBER6 8
  25. #define NUMBER7 9
  26. #define NUMBER8 10
  27.  
  28. #define BNUMBER0 12
  29. #define BNUMBER1 13
  30. #define BNUMBER2 14
  31. #define BNUMBER3 15
  32. #define BNUMBER4 16
  33. #define BNUMBER5 17
  34. #define BNUMBER6 18
  35. #define BNUMBER7 19
  36. #define BNUMBER8 20
  37. #define BNUMBER9 21
  38. #define BNUMBER10 22
  39. #define BNUMBER11 23
  40.  
  41. #define BLUE 0 
  42. #define WHITE 1 
  43. #define BLACK 2 
  44. #define RED 3 
  45.  
  46.  
  47. #define INPUTWIDTH 80
  48. #define INPUTHEIGHT 10
  49. #define OKWIDTH 20
  50. #define OKHEIGHT 10
  51. #define CANCELWIDTH 52
  52. #define CANCELHEIGHT 10
  53. #define BITWIDTH 16
  54. #define BITHEIGHT 10
  55.  
  56. char buffer1[10];
  57. char buffer2[10];
  58. char buffer3[10];
  59. char buffer4[10];
  60. char buffer5[10];
  61. char buffer6[10];
  62. char buffer7[10];
  63. char buffer8[10];
  64. char ubuffer1[10];
  65. char ubuffer2[10];
  66. char ubuffer3[10];
  67. char ubuffer4[10];
  68. char ubuffer5[10];
  69. char ubuffer6[10];
  70. char ubuffer7[10];
  71. char ubuffer8[10];
  72.  
  73. SHORT Inputxys[] = { /* String input gadget xy pairs */
  74.         0,0,
  75.         INPUTWIDTH+1,0,
  76.         INPUTWIDTH+1,INPUTHEIGHT,
  77.         0,INPUTHEIGHT,
  78.         0,0
  79. };
  80.  
  81. struct Border InputBorder = { /* border for String input gadget */
  82.         -1,-1,                          /* left,top */
  83.         WHITE,RED,JAM1, /* front,back,drawmode */
  84.         5,                                              /* # of xy pairs */
  85.         Inputxys,                                /* array of xy pairs */
  86.         NULL                      /* ptr to another border */
  87. };
  88.  
  89. SHORT Okxys[] = { /* OK gadget xy pairs */
  90.         0,0,
  91.         OKWIDTH+1,0,
  92.         OKWIDTH+1,OKHEIGHT+1,
  93.         0,OKHEIGHT+1,
  94.         0,0
  95. };
  96.  
  97. struct Border OkBorder = {      /* border for OK gadget */
  98.         -1,-1,                  /* left,top */
  99.         WHITE,BLACK,JAM1,       /* front,back,drawmode */
  100.         5,                      /* # of xy pairs */
  101.         Okxys,                  /* array of xy pairs */
  102.         NULL                    /* ptr to another border */
  103. };
  104.  
  105. SHORT Cancelxys[] = { /* CANCAL gadget xy pairs */
  106.         0,0,
  107.         CANCELWIDTH+1,0,
  108.         CANCELWIDTH+1,CANCELHEIGHT+1,
  109.         0,CANCELHEIGHT+1,
  110.         0,0
  111. };
  112.  
  113. struct Border CancelBorder = {  /* border for CANCEL gadget */
  114.         -1,-1,                  /* left,top */
  115.         WHITE,RED,JAM1,         /* front,back,drawmode */
  116.         5,                      /* # of xy pairs */
  117.         Cancelxys,              /* array of xy pairs */
  118.         NULL                    /* ptr to another border */
  119. };
  120.  
  121. SHORT Bitxys[] = { /* bit gadget xy pairs */
  122.         0,0,
  123.         BITWIDTH+1,0,
  124.         BITWIDTH+1,BITHEIGHT+1,
  125.         0,BITHEIGHT+1,
  126.         0,0
  127. };
  128.  
  129. struct Border BitBorder = {  /* border for bit gadget */
  130.         -1,-1,                  /* left,top */
  131.         WHITE,RED,JAM1,         /* front,back,drawmode */
  132.         5,                      /* # of xy pairs */
  133.         Bitxys,              /* array of xy pairs */
  134.         NULL                    /* ptr to another border */
  135. };
  136.  
  137. struct StringInfo       field1 = {
  138.         buffer1,     /* buffer */
  139.         ubuffer1,    /* undo buffer */
  140.         7,              /* char posn in buffer */
  141.         8,            /* max # of chars */
  142. };
  143.  
  144. struct StringInfo       field2 = {
  145.         buffer2,     /* buffer */
  146.         buffer2,    /* undo buffer */
  147.         7,              /* char posn in buffer */
  148.         8,            /* max # of chars */
  149. };
  150. struct StringInfo       field3 = {
  151.         buffer3,     /* buffer */
  152.         ubuffer3,    /* undo buffer */
  153.         7,              /* char posn in buffer */
  154.         8,            /* max # of chars */
  155. };
  156. struct StringInfo       field4 = {
  157.         buffer4,     /* buffer */
  158.         ubuffer4,    /* undo buffer */
  159.         7,              /* char posn in buffer */
  160.         8,            /* max # of chars */
  161. };
  162. struct StringInfo       field5 = {
  163.         buffer5,     /* buffer */
  164.         ubuffer5,    /* undo buffer */
  165.         7,              /* char posn in buffer */
  166.         8,            /* max # of chars */
  167. };
  168. struct StringInfo       field6 = {
  169.         buffer6,     /* buffer */
  170.         ubuffer6,    /* undo buffer */
  171.         7,              /* char posn in buffer */
  172.         8,            /* max # of chars */
  173. };
  174. struct StringInfo       field7 = {
  175.         buffer7,     /* buffer */
  176.         ubuffer7,    /* undo buffer */
  177.         7,              /* char posn in buffer */
  178.         8,            /* max # of chars */
  179. };
  180. struct StringInfo       field8 = {
  181.         buffer8,     /* buffer */
  182.         ubuffer8,    /* undo buffer */
  183.         7,              /* char posn in buffer */
  184.         8,            /* max # of chars */
  185. };
  186.  
  187. struct IntuiText text1 = {
  188.     WHITE,RED,JAM1,-50,0,0,"CMap:",NULL};
  189. struct IntuiText text2 = {
  190.     WHITE,RED,JAM1,-50,0,0,"Mode:",NULL};
  191. struct IntuiText text3 = {
  192.     WHITE,RED,JAM1,-50,0,0,"SrcX:",NULL};
  193. struct IntuiText text4 = {
  194.     WHITE,RED,JAM1,-50,0,0,"SrcY:",NULL};
  195. struct IntuiText text5 = {
  196.     WHITE,RED,JAM1,-50,0,0,"SrcW:",NULL};
  197. struct IntuiText text6 = {
  198.     WHITE,RED,JAM1,-50,0,0,"SrcH:",NULL};
  199. struct IntuiText text7 = {
  200.     WHITE,RED,JAM1,-50,0,0,"DCol:",NULL};
  201. struct IntuiText text8 = {
  202.     WHITE,RED,JAM1,-50,0,0,"DRow:",NULL};
  203.  
  204. struct IntuiText btext0 = {
  205.     WHITE,RED,JAM1,0,0,0,"MC",NULL};
  206. struct IntuiText btext1 = {
  207.     WHITE,RED,JAM1,0,0,0,"MR",NULL};
  208. struct IntuiText btext2 = {
  209.     WHITE,RED,JAM1,0,0,0,"FC",NULL};
  210. struct IntuiText btext3 = {
  211.     WHITE,RED,JAM1,0,0,0,"FR",NULL};
  212. struct IntuiText btext4 = {
  213.     WHITE,RED,JAM1,0,0,0,"FR",NULL};
  214. struct IntuiText btext5 = {
  215.     WHITE,RED,JAM1,0,0,0,"FC",NULL};
  216. struct IntuiText btext6 = {
  217.     WHITE,RED,JAM1,0,0,0,"CE",NULL};
  218. struct IntuiText btext7 = {
  219.     WHITE,RED,JAM1,0,0,0,"AS",NULL};
  220. struct IntuiText btext8 = {
  221.     WHITE,RED,JAM1,0,0,0,"D1",NULL};
  222. struct IntuiText btext9 = {
  223.     WHITE,RED,JAM1,0,0,0,"D2",NULL};
  224. struct IntuiText btext10 = {
  225.     WHITE,RED,JAM1,0,0,0,"D3",NULL};
  226. struct IntuiText btext11 = {
  227.     WHITE,RED,JAM1,-48,0,0,"Spec: D4",NULL};
  228.  
  229. struct IntuiText OKText = {
  230.     WHITE,RED,JAM1,2,0,0,"OK",NULL};
  231. struct IntuiText CancelText = {
  232.     WHITE,RED,JAM1,2,0,0,"CANCEL",NULL};
  233.  
  234. struct Gadget sGadget[] = {    /* the input gadget */
  235. {
  236.         NULL,                       /* ptr to next gadget */
  237.         60,20,INPUTWIDTH,INPUTHEIGHT,   /* left,top,width,height */
  238.         GADGHCOMP,                 /* Gadet_Flags */
  239.         RELVERIFY,                  /* Activation Flag */
  240.         STRGADGET,                /* gadget type */
  241.         &InputBorder,                 /* gadget render */
  242.         NULL,                       /* select render */
  243.         &text1,                     /* text for input prompt */
  244.         0,                          /* mutual exclude */
  245.         &field1,                    /* special info */
  246.         NUMBER1,                       /* ID */
  247.         NULL                        /* UserData */
  248. },
  249. {
  250.         &sGadget[0],                       /* ptr to next gadget */
  251.         60,30,INPUTWIDTH,INPUTHEIGHT,   /* left,top,width,height */
  252.         GADGHCOMP,            /* Gadet_Flags */
  253.         RELVERIFY,                  /* Activation Flag */
  254.         STRGADGET,                /* gadget type */
  255.         &InputBorder,                 /* gadget render */
  256.         NULL,                       /* select render */
  257.         &text2,                     /* text for input prompt */
  258.         0,                          /* mutual exclude */
  259.         &field2,                /* special info */
  260.         NUMBER2,                       /* ID */
  261.         NULL                        /* UserData */
  262. },
  263. {
  264.         &sGadget[1],                       /* ptr to next gadget */
  265.         60,40,INPUTWIDTH,INPUTHEIGHT,   /* left,top,width,height */
  266.         GADGHCOMP,                 /* GadetFlags */
  267.         RELVERIFY,                  /* Activation Flag */
  268.         STRGADGET,                /* gadget type */
  269.         &InputBorder,                 /* gadget render */
  270.         NULL,                       /* select render */
  271.         &text3,                     /* text for input prompt */
  272.         0,                          /* mutual exclude */
  273.         &field3,                /* special info */
  274.         NUMBER3,                       /* ID */
  275.         NULL                        /* UserData */
  276. },
  277. {
  278.         &sGadget[2],                       /* ptr to next gadget */
  279.         60,50,INPUTWIDTH,INPUTHEIGHT,   /* left,top,width,height */
  280.         GADGHCOMP,                 /* Gadget Flags */
  281.         RELVERIFY,                  /* Activation Flag */
  282.         STRGADGET,                /* gadget type */
  283.         &InputBorder,                 /* gadget render */
  284.         NULL,                       /* select render */
  285.         &text4,                     /* text for input prompt */
  286.         0,                          /* mutual exclude */
  287.         &field4,                /* special info */
  288.         NUMBER4,                       /* ID */
  289.         NULL                        /* UserData */
  290. },
  291. {
  292.         &sGadget[3],                       /* ptr to next gadget */
  293.         60,60,INPUTWIDTH,INPUTHEIGHT,   /* left,top,width,height */
  294.         GADGHCOMP,                 /* Gadget Flags */
  295.         RELVERIFY,                  /* Activation Flag */
  296.         STRGADGET,                /* gadget type */
  297.         &InputBorder,                 /* gadget render */
  298.         NULL,                       /* select render */
  299.         &text5,                     /* text for input prompt */
  300.         0,                              /* mutual exclude */
  301.         &field5,                /* special info */
  302.         NUMBER5,                       /* ID */
  303.         NULL                        /* UserData */
  304. },
  305. {
  306.         &sGadget[4],                       /* ptr to next gadget */
  307.         60,70,INPUTWIDTH,INPUTHEIGHT,   /* left,top,width,height */
  308.         GADGHCOMP,                 /* Gadget Flags */
  309.         RELVERIFY,                  /* Activation Flag */
  310.         STRGADGET,                /* gadget type */
  311.         &InputBorder,                 /* gadget render */
  312.         NULL,                       /* select render */
  313.         &text6,                     /* text for input prompt */
  314.         0,                          /* mutual exclude */
  315.         &field6,                /* special info */
  316.         NUMBER6,                       /* ID */
  317.         NULL                        /* UserData */
  318. },
  319. {
  320.         &sGadget[5],                       /* ptr to next gadget */
  321.         60,80,INPUTWIDTH,INPUTHEIGHT,   /* left,top,width,height */
  322.         GADGHCOMP,                 /* Gadget Flags */
  323.         RELVERIFY,                      /* Activation Flag */
  324.         STRGADGET,                /* gadget type */
  325.         &InputBorder,                 /* gadget render */
  326.         NULL,                       /* select render */
  327.         &text7,                     /* text for input prompt */
  328.         0,                          /* mutual exclude */
  329.         &field7,                /* special info */
  330.         NUMBER7,                       /* ID */
  331.         NULL                        /* UserData */
  332. },
  333. {
  334.         &sGadget[6],                       /* ptr to next gadget */
  335.         60,90,INPUTWIDTH,INPUTHEIGHT,   /* left,top,width,height */
  336.         GADGHCOMP,                 /* Gadget Flags */
  337.         RELVERIFY,                  /* Activation Flag */
  338.         STRGADGET,                /* gadget type */
  339.         &InputBorder,                 /* gadget render */
  340.         NULL,                       /* select render */
  341.         &text8,                     /* text for input prompt */
  342.         0,                          /* mutual exclude */
  343.         &field8,                /* special info */
  344.         NUMBER8,                       /* ID */
  345.         NULL                        /* UserData */
  346. }
  347. };
  348.  
  349. struct Gadget bgadget[] = {            /* the bit gadgets */
  350. {
  351.         &sGadget[7],                    /* ptr to next gadget */
  352.         258,110,BITWIDTH,BITHEIGHT,     /* left,top,width,height */
  353.         GADGHCOMP,                    /* Gadget Flags */
  354.         RELVERIFY|TOGGLESELECT,        /* Activation Flag */
  355.         BOOLGADGET,                /* gadget type */
  356.         &BitBorder,                 /* gadget render */
  357.         NULL,                       /* select render */
  358.         &btext0,                     /* text for input prompt */
  359.         0,                          /* mutual exclude */
  360.         NULL,                    /* special info */
  361.         BNUMBER0,                       /* ID */
  362.         NULL                        /* UserData */
  363. },
  364. {
  365.         &bgadget[0],                       /* ptr to next gadget */
  366.         240,110,BITWIDTH,BITHEIGHT,     /* left,top,width,height */
  367.         GADGHCOMP,                    /* Gadget Flags */
  368.         RELVERIFY|TOGGLESELECT,        /* Activation Flag */
  369.         BOOLGADGET,                /* gadget type */
  370.         &BitBorder,                 /* gadget render */
  371.         NULL,                       /* select render */
  372.         &btext1,                     /* text for input prompt */
  373.         0,                          /* mutual exclude */
  374.         NULL,                    /* special info */
  375.         BNUMBER1,                       /* ID */
  376.         NULL                        /* UserData */
  377. },
  378. {
  379.         &bgadget[1],                    /* ptr to next gadget */
  380.         222,110,BITWIDTH,BITHEIGHT,     /* left,top,width,height */
  381.         GADGHCOMP,                    /* Gadget Flags */
  382.         RELVERIFY|TOGGLESELECT,        /* Activation Flag */
  383.         BOOLGADGET,                /* gadget type */
  384.         &BitBorder,                 /* gadget render */
  385.         NULL,                       /* select render */
  386.         &btext2,                     /* text for input prompt */
  387.         0,                          /* mutual exclude */
  388.         NULL,                    /* special info */
  389.         BNUMBER2,                       /* ID */
  390.         NULL                        /* UserData */
  391. },
  392. {
  393.         &bgadget[2],                    /* ptr to next gadget */
  394.         204,110,BITWIDTH,BITHEIGHT,     /* left,top,width,height */
  395.         GADGHCOMP,                    /* Gadget Flags */
  396.         RELVERIFY|TOGGLESELECT,        /* Activation Flag */
  397.         BOOLGADGET,                /* gadget type */
  398.         &BitBorder,                 /* gadget render */
  399.         NULL,                       /* select render */
  400.         &btext3,                     /* text for input prompt */
  401.         0,                          /* mutual exclude */
  402.         NULL,                    /* special info */
  403.         BNUMBER3,                       /* ID */
  404.         NULL                        /* UserData */
  405. },
  406. {
  407.         &bgadget[3],                       /* ptr to next gadget */
  408.         186,110,BITWIDTH,BITHEIGHT,     /* left,top,width,height */
  409.         GADGHCOMP,                    /* Gadget Flags */
  410.         RELVERIFY|TOGGLESELECT,        /* Activation Flag */
  411.         BOOLGADGET,                /* gadget type */
  412.         &BitBorder,                 /* gadget render */
  413.         NULL,                       /* select render */
  414.         &btext4,                     /* text for input prompt */
  415.         0,                          /* mutual exclude */
  416.         NULL,                    /* special info */
  417.         BNUMBER4,                       /* ID */
  418.         NULL                        /* UserData */
  419. },
  420. {
  421.         &bgadget[4],                       /* ptr to next gadget */
  422.         168,110,BITWIDTH,BITHEIGHT,     /* left,top,width,height */
  423.         GADGHCOMP,                    /* Gadget Flags */
  424.         RELVERIFY|TOGGLESELECT,        /* Activation Flag */
  425.         BOOLGADGET,                /* gadget type */
  426.         &BitBorder,                 /* gadget render */
  427.         NULL,                       /* select render */
  428.         &btext5,                     /* text for input prompt */
  429.         0,                          /* mutual exclude */
  430.         NULL,                    /* special info */
  431.         BNUMBER5,                       /* ID */
  432.         NULL                        /* UserData */
  433. },
  434. {
  435.         &bgadget[5],                       /* ptr to next gadget */
  436.         150,110,BITWIDTH,BITHEIGHT,     /* left,top,width,height */
  437.         GADGHCOMP,                    /* Gadget Flags */
  438.         RELVERIFY|TOGGLESELECT,        /* Activation Flag */
  439.         BOOLGADGET,                /* gadget type */
  440.         &BitBorder,                 /* gadget render */
  441.         NULL,                       /* select render */
  442.         &btext6,                     /* text for input prompt */
  443.         0,                          /* mutual exclude */
  444.         NULL,                    /* special info */
  445.         BNUMBER6,                       /* ID */
  446.         NULL                        /* UserData */
  447. },
  448. {
  449.         &bgadget[6],                       /* ptr to next gadget */
  450.         132,110,BITWIDTH,BITHEIGHT,     /* left,top,width,height */
  451.         GADGHCOMP,                    /* Gadget Fllags */
  452.         RELVERIFY|TOGGLESELECT,        /* Activation Flag */
  453.         BOOLGADGET,                /* gadget type */
  454.         &BitBorder,                 /* gadget render */
  455.         NULL,                       /* select render */
  456.         &btext7,                     /* text for input prompt */
  457.         0,                          /* mutual exclude */
  458.         NULL,                    /* special info */
  459.         BNUMBER7,                       /* ID */
  460.         NULL                        /* UserData */
  461. },
  462. {
  463.         &bgadget[7],                       /* ptr to next gadget */
  464.         114,110,BITWIDTH,BITHEIGHT,     /* left,top,width,height */
  465.         GADGHCOMP,                    /* Gadget Fllags */
  466.         RELVERIFY|TOGGLESELECT,        /* Activation Flag */
  467.         BOOLGADGET,                /* gadget type */
  468.         &BitBorder,                 /* gadget render */
  469.         NULL,                       /* select render */
  470.         &btext8,                     /* text for input prompt */
  471.         0,                          /* mutual exclude */
  472.         NULL,                    /* special info */
  473.         BNUMBER8,                       /* ID */
  474.         NULL                        /* UserData */
  475. },
  476. {
  477.         &bgadget[8],                       /* ptr to next gadget */
  478.         96,110,BITWIDTH,BITHEIGHT,         /* left,top,width,height */
  479.         GADGHCOMP,                    /* Gadget Fllags */
  480.         RELVERIFY|TOGGLESELECT,        /* Activation Flag */
  481.         BOOLGADGET,                /* gadget type */
  482.         &BitBorder,                 /* gadget render */
  483.         NULL,                       /* select render */
  484.         &btext9,                     /* text for input prompt */
  485.         0,                          /* mutual exclude */
  486.         NULL,                    /* special info */
  487.         BNUMBER9,                       /* ID */
  488.         NULL                        /* UserData */
  489. },
  490.         &bgadget[9],                       /* ptr to next gadget */
  491.         78,110,BITWIDTH,BITHEIGHT,         /* left,top,width,height */
  492.         GADGHCOMP,                    /* Gadget Fllags */
  493.         RELVERIFY|TOGGLESELECT,        /* Activation Flag */
  494.         BOOLGADGET,                /* gadget type */
  495.         &BitBorder,                 /* gadget render */
  496.         NULL,                       /* select render */
  497.         &btext10,                     /* text for input prompt */
  498.         0,                          /* mutual exclude */
  499.         NULL,                    /* special info */
  500.         BNUMBER10,                       /* ID */
  501.         NULL                        /* UserData */
  502. },
  503. {
  504.         &bgadget[10],                   /* ptr to next gadget */
  505.         60,110,BITWIDTH,BITHEIGHT,         /* left,top,width,height */
  506.         GADGHCOMP,                    /* Gadget Fllags */
  507.         RELVERIFY|TOGGLESELECT,        /* Activation Flag */
  508.         BOOLGADGET,                /* gadget type */
  509.         &BitBorder,                 /* gadget render */
  510.         NULL,                       /* select render */
  511.         &btext11,                     /* text for input prompt */
  512.         0,                          /* mutual exclude */
  513.         NULL,                    /* special info */
  514.         BNUMBER11,                       /* ID */
  515.         NULL                        /* UserData */
  516. }
  517. };
  518.  
  519.  
  520. struct Gadget OKGadget = {
  521.         &bgadget[11]
  522.         256,140,OKWIDTH,OKHEIGHT,     /* left,top,width,height */
  523.         GADGHCOMP,                  /* Gadget Flags */
  524.         RELVERIFY|ENDGADGET,        /* Activation flag */
  525.         BOOLGADGET,               /* gadget type */
  526.         &OkBorder,                  /* gadget render */
  527.         NULL,                       /* select render */
  528.         &OKText,
  529.         0,                          /* mutual exclude */
  530.         NULL,                       /* special info */
  531.         OK,                         /* ID */
  532.         NULL                        /* UserData */
  533. };
  534.  
  535. struct Gadget CancelGadget = {
  536.         &OKGadget,
  537.         160,140,CANCELWIDTH,CANCELHEIGHT,     /* left,top,width,height */
  538.         GADGHCOMP,                      /* Gadget Flags */
  539.         RELVERIFY|ENDGADGET,            /* Activation flag */
  540.         BOOLGADGET,                   /* gadget type */
  541.         &CancelBorder,                      /* gadget render */
  542.         NULL,                           /* select render */
  543.         &CancelText
  544.         0,                              /* mutual exclude */
  545.         NULL,                           /* special info */
  546.         CANCEL,                         /* ID */
  547.         NULL                            /* UserData */
  548. };
  549.  
  550. struct IntuiText projectext[] = {
  551.   {
  552.     BLUE, WHITE, JAM2,      /* FrontPen, BackPen, DrawMode */
  553.     0, 20,                   /* LeftEdge, TopEdge */
  554.     NULL,                   /* ITextFont */
  555.     "\251 1987 Commodore",      /* IText */
  556.     NULL                /* NextText */
  557.   },
  558.   {
  559.     BLUE, WHITE, JAM2,      /* FrontPen, BackPen, DrawMode */
  560.     0, 10,                   /* LeftEdge, TopEdge */
  561.     NULL,                   /* ITextFont */
  562.     "By Andy Finkel",       /* IText */
  563.     &projectext[0]          /* NextText */
  564.   }
  565.   {
  566.     BLUE, WHITE, JAM2,      /* FrontPen, BackPen, DrawMode */
  567.     0, 0,                   /* LeftEdge, TopEdge */
  568.     NULL,                   /* ITextFont */
  569.     "Printer Driver Control",   /* IText */
  570.     &projectext[1]          /* NextText */
  571.   }
  572. };
  573.  
  574. struct MenuItem projectitems[] = {
  575.   { 
  576.     NULL,                   /* next item */
  577.     0, 0, 180, 30,          /* LeftEdge, TopEdge, Width, Height */
  578.     ITEMENABLED | ITEMTEXT | HIGHCOMP,
  579.     0,                      /* mutual exclude */
  580.     (APTR)&projectext[2],    /* ItemFill */
  581.     NULL,                   /* SelectFill */
  582.     NULL,                   /* Command */
  583.     NULL,                   /* SubItem */
  584.     NULL                    /* NextSelect */
  585.   }
  586. };
  587.  
  588. struct Menu menus[] = {
  589.   {
  590.     NULL                /* next menu */
  591.     10+0, 0, 100, 0,    /* LeftEdge, TopEdge, Width, Height */
  592.     MENUENABLED,        /* flags */
  593.     "About",              /* name */
  594.     projectitems        /* first item */
  595.   },
  596. };
  597.